import http from './interface'

/**
 * 将业务所有接口统一起来便于维护
 * 如果项目很大可以将 url 独立成文件，接口分成不同的模块
 */

export const get = (url,data) => {
	return http.get(url, data)
}

export const post = (url,data) => {
	return http.post(url, data)
}

/**
 *  登录接口
 */
export const login = (data) => {
	let header = {'Content-Type':'application/x-www-form-urlencoded'}
	return http.post('/login', data, header)
}

/**
 *  公用接口 - 门诊列表
 */
export const deptList = (data) => {
	let header = {'Content-Type':'application/x-www-form-urlencoded'}
	return http.get('/deptList', data, header)
}

// 默认全部导出 import api from './static/common/index.js'
export default {
	login,
	deptList,
	get,
	post
}